import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.io.*;
import java.util.*;
import java.util.logging.Logger;


public class StudentGUI2 extends JFrame{
        private JTable table;
        private JLabel lbl1 = new JLabel("ID Number: ");
        private JLabel lbl2 = new JLabel("Name: ");
        private JLabel lbl3 = new JLabel("ClassCode: ");
        private JButton btn1 = new JButton("VIEW RECORD");
        private JButton btn2 = new JButton("UPLOAD");
        private JButton btn3 = new JButton("DOWNLOAD");
        String line;
   		String username = "";
   		JFrame f;


public StudentGUI2(){
        f = new JFrame(" ");
        f.setBounds(500,300,500,300);
        f.setLayout(new GridLayout(8,1));
        f.setVisible(true);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JPanel p = new JPanel();
        p.setLayout(new GridLayout(1,1));
        p.add(lbl1);

        JPanel p2 = new JPanel();
        p2.setLayout(new GridLayout(1,1));
        p2.add(lbl2);
        
        JPanel p3 = new JPanel();
        p3.setLayout(new GridLayout(1,1));
        p3.add(lbl3);
        
        JPanel p4 = new JPanel();
        p4.setLayout(new GridLayout(0,3));
        p4.add(btn1);
        p4.add(btn2);
        p4.add(btn3);
        
        
    btn1.addActionListener(new ActionListener(){

         public void actionPerformed(ActionEvent e){

          try{

            ViewScore s = new ViewScore();
            s.setVisible(true);
            dispose();
            s.setSize(800,600);
            }catch(Exception err){

            }
        }
        });
  btn2.addActionListener(new ActionListener(){

         public void actionPerformed(ActionEvent e){

          try{

            Uploader s = new Uploader();
            s.setVisible(true);
            dispose();
            s.setSize(800,600);
            }catch(Exception err){

            }
        }
        });
   
    btn3.addActionListener(new ActionListener(){

         public void actionPerformed(ActionEvent e){

          try{

            Downloader s = new Downloader();
            s.setVisible(true);
            dispose();
            s.setSize(800,600);
            }catch(Exception err){

            }
        }
        });
   
   
        
        JPanel p5 = new JPanel();
        p5 = new JPanel();
                p5.setLayout( new BorderLayout() );
               
                String columnNames[] = { "Activity No", "Activity Name", "Date" };

                String dataValues[][] =
                {
                        { " ", "","" },
                        { " ", "","" },
                        { " ", "","" },
                };

                table = new JTable( dataValues, columnNames );
               

                f.add(p);
                f.add(p2);
                f.add(p3);
                f.add(p4);
                f.add(p5);
}
public static void main (String[] args){
        StudentGUI2 s = new StudentGUI2();
}
}
